<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="Admin/webroot/css/style.css"/>
<title>首页</title>
</head>
<script type="text/javascript" src="Admin/webroot/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="Admin/webroot/js/global.js"></script>
<script type="text/javascript" src="Admin/webroot/js/input.js"></script>
<body>
<!--[if lte IE 6]>
<script src="js/DD_belatedPNG_0.0.8a.js" language="javascript" type="text/javascript"></script>
<script type="text/javascript">
	DD_belatedPNG.fix('.pngfix');
</script>
<![endif]-->
<div class="rightbox">
  <div class="rightbox-col" id="right">
    <div class="main"> {include file='../Common/main_title.html'}
      <div class="bd">
        <div class="height_20"></div>
        <div class="main_content">
          <div class="left-table"><span>相片名称: </span></div>
          <div class="right-table">
            <input type="text" name="title" value="{$photo['title']}" />
          </div>
          <div class="height_10"></div>
          
           {if $_CFG.DIGLOSSIA==1}
                                    <div class="left-table"><span class="red">*</span>英文名称：</div>
                                    <div class="right-table"><input type="text" name="en_title" value="{$photo.en_title}" placeholder="请输入标题"/></div>
                                    <div class="msg"></div>
                                    <div class="height_10"></div>
                                    {/if}
          
          <div class="left-table"><span>相片描述:</span></div>
          <div class="right-table">
            <textarea style="display:inline-block" class="keywords" name="abstract" >{$photo['abstract']}</textarea>
          </div>
          <div class="height_10"></div>
          
          {if $_CFG.DIGLOSSIA==1}
                                    <div class="left-table"><span class="red">*</span>英文描述：</div>
                                    <div class="right-table">  <textarea style="display:inline-block" class="keywords" name="en_abstract" >{$photo['en_abstract']}</textarea></div>
                                    <div class="msg"></div>
                                    <div class="height_10"></div>
                                    {/if}
          
          <input type="hidden" name="id" value="{$id}" />
          <div class="left-table"><span>缩略图:</span></div>
          <div class="right-table">
            <input type="text" id="img_url" disabled="disabled" name="thumb_url" value="{$photo.original_pic}" id="thumb"/>
            <a href="javascript:;"   class="localUpload" onclick="$(this).next().children('form').children('.ke-upload-file').click()">本地上传</a>
            <input id="uploadButton_" return_url="img_url" type="button" value="submit" />
          </div>
          <div class="height_10"></div>
          <div class="left-table"><span>栏目:</span></div>
          <div class="right-table">
            <div class="s-select-c" style="z-index:999;">
              <input disabled="disabled" type="text" autocomplete="off" name="parent_name" {if $photo.cat_name}value="{$photo.cat_name|default:'未分类'}"{else}value="请选择所属栏目"{/if} class="s-select"/>
              <div class="s-select-menu"  style="z-index:999">
                <ul>
                  {foreach from=$parent_list item=list}
                  <li data-select="{$list.id}"><a href="#">{$list.name}</a></li>
                  {/foreach}
                </ul>
              </div>
              <input type="hidden" class="fmenu" name="cat_id" value="{$photo.cat_id|default:0}" />
            </div>
          </div>
          <div class="height_10"></div>
          <p>
            <input class="submit_btn" type="submit" value="保存" />
          </p>
        </div>
      </div>
    </div>
  </div>
  <div class="clear"></div>
</div>
<script type="text/javascript" src="Admin/webroot/js/editor/kindeditor.js"></script> 
<script type="text/javascript" src="Admin/webroot/js/kindeditor_upload.js"></script> 
<script type="text/javascript">
    $(function(){
		hungry_uploadimg('index.php?g=admin&m=photo&a=file');	
		$('.submit_btn').click(function(){
			var action = '{$action}';
			var cat_id=($('input[name=cat_id]').val());
			var id=($('input[name=id]').val());
			var title=($('input[name=title]').val());
			var en_title=($('input[name=en_title]').val());
			var abstract=($('textarea[name=abstract]').val());
			var en_abstract=($('textarea[name=en_abstract]').val());
			var thumb_url=($('input[name=thumb_url]').val());
			$.post('index.php?g=admin&m=photo&a='+action,{ id:id,cat_id:cat_id,title:title,abstract:abstract,en_title:en_title,en_abstract:en_abstract,thumb_url:thumb_url},function(result){
				
					showMsg(result.content,result.url);
			
				},'json');
			})
		
		});
	
</script>
</body>
</html>
